<!--
  表格搜索组件
-->
<template>
    <div class="table-search">
      <Input search enter-button @on-search="serachData" :placeholder="placeholder" class="search-input"/>
      <div class="search-area">
        <slot></slot>
      </div>
    </div>
</template>

<script>
export default {
  name: "table-search",
  props:{
    placeholder:{
      type:String,
      default:"请输入..."
    },
  },
  methods:{
    serachData(value){
      this.$emit("searchBack",value)
    }
  }
}
</script>

<style lang="less" scoped>
.table-search{
    margin-top: 5px;
    height: 50px;
  .search-input{
    padding:10px;
    width: 30%;
    float: left;
  }
  .search-area{
    padding:10px;
    float: right;
    Button{
      margin-right: 5px;
    }
  }
}
</style>
